package org.sean.contactdemo.util;

import java.util.Date;

import org.sean.contactdemo.domain.User;

public class ClientSession {

	private static ClientSession session = null;
	private int currentUserId;
	private User user = null;
	private boolean isValid = false;
	private Date loginTime;
	
	private ClientSession(){
	}
	
	public static ClientSession getInstance(){
		if (session ==  null){
			session = new ClientSession();
		}
		return session;
	}

	public int getCurrentUserId() {
		return currentUserId;
	}

	public void setCurrentUserId(int currentUserId) {
		this.currentUserId = currentUserId;
	}

	public boolean isValid() {
		return isValid;
	}

	public void setValid(boolean isValid) {
		this.isValid = isValid;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
}
